package com.example.startupdemo;

import android.content.Context;
import android.util.Log;

/**
 * @author: tuyrt7 on 2020/11/30.
 */
class Sdk3 {
    private static volatile Sdk3 ourInstance;
    private static Context sApplicationContext;
    private static final String TAG = "Sdk3";
    private Sdk3() {
    }

    public static Sdk3 get() {
        if (ourInstance == null) {
            synchronized (Sdk3.class) {
                if (ourInstance == null) {
                    ourInstance = new Sdk3();
                }
            }
        }

        return ourInstance;
    }

    public static void init(Context applicationContext) {
        sApplicationContext = applicationContext;
    }

    public void printApplicationName() {
        Log.e(TAG, "Sdk3 printApplicationName " + sApplicationContext.getPackageName());
    }
}
